# from django import forms
# from .models import Student, College, Major
#
#
# class StudentForm(forms.ModelForm):
#     class Meta:
#         model = Student
#         fields = '__all__'
#
#     def __init__(self, *args, **kwargs):
#         super(StudentForm, self).__init__(*args, **kwargs)
#         self.fields['college'].queryset = College.objects.all()
#         if self.instance:
#             self.fields['major'].queryset = Major.objects.filter(college=self.instance.college)
